package com.aistar.order.controller;

import com.aistar.common.util.IdWorker;

import com.aistar.common.vo.Result;
import com.aistar.order.entity.OrderBill;
import com.aistar.order.service.IHotelOrderService;
import com.aistar.order.service.IOrderBillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;


/**
 * Created by Administrator on 2019/6/26 0026.
 */
@Controller
public class OrderBillController {

    @Autowired
    private IOrderBillService service;
    @Autowired
    private IdWorker idWorker;

    @PostMapping("/orderbill")
    @ResponseBody
    public Result save(OrderBill orderBill){
        orderBill.setId(idWorker.nextId());
        service.save(orderBill);
        return new Result(true,2000,"添加发票",orderBill);
    }



}
